// utils/system.js  
export function getNavigationBarHeight() {
  const systemInfo = uni.getSystemInfoSync(); 
  const statusBarHeight = systemInfo.statusBarHeight; 
  let titleBarHeight = 44; // 默认标题栏高度 
  
  // 微信小程序 
  if (uni.getMenuButtonBoundingClientRect)  {
    const menuButtonInfo = uni.getMenuButtonBoundingClientRect(); 
    titleBarHeight = (menuButtonInfo.top  - statusBarHeight) * 2 + menuButtonInfo.height; 
  }
  console.log(statusBarHeight,"")
  return statusBarHeight;
}
 
export function getTitleBarHeight() {
  const systemInfo = uni.getSystemInfoSync(); 
  const statusBarHeight = systemInfo.statusBarHeight; 
  let titleBarHeight = 44; // 默认标题栏高度 
  
  // 微信小程序 
  if (uni.getMenuButtonBoundingClientRect)  {
    const menuButtonInfo = uni.getMenuButtonBoundingClientRect(); 
    titleBarHeight = (menuButtonInfo.top  - statusBarHeight) * 2 + menuButtonInfo.height; 
  }
  
  return  titleBarHeight;
}
 

